<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * Class SunPicture
 * @package App
 */
class SunPicture extends Model
{
    /**
     * @var array
     */
    protected $fillable=['posts_pic','posts_content','comments_count','level','user_id'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function comments()
    {
        return $this->hasMany(PostComment::class);
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
